package ExpressThree;

//直接与设备相连
public class DCT extends IONode {
    String type;
    //设置设备名称
    DCT(String name,String type){
        //设备名称
        super(name);
        this.type=type;
    }

    @Override
    public void setNext(IONode next) {
        super.setNext(next);
    }
    @Override
    public IONode getNext() {
        return super.getNext();
    }

    @Override
    public String getIdentifyName() {
        return super.getIdentifyName();
    }

    public String getType() {
        return type;
    }

    @Override
    public String toString() {
        StringBuilder str= new StringBuilder();
        for(int i=0;i<super.getList_waiting().size();i++){
            str.append(super.getList_waiting().get(i)).append("\n");
        }
        return "identifyName: "+super.getIdentifyName()+"\n"+
                "type: "+this.type+"\n"+
                "currentProcess: "+super.getProcessNode()+"\n"+
                "wait list:\n"+ str.toString();
    }
}
